﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;
using SHDocVw;

namespace BrowerReader
{
    class Program
    {
        [DllImport("advapi32.DLL", SetLastError = true)]
        public static extern int LogonUser(string lpszUsername, string lpszDomain, string lpszPassword, int dwLogonType, int dwLogonProvider, ref IntPtr phToken);

        static IWebBrowserApp browser1;
        static SHDocVw.InternetExplorer ie;

        static void Main(string[] args)
        {
            ie = new SHDocVw.InternetExplorer();
            browser1 = (IWebBrowserApp)ie;
            browser1.Navigate("http://172.25.20.82/EPM/userdefined/edit.aspx?etc=10004&id=%7B4BE388FB-575E-E311-898C-00155D141823%7D&pagemode=iframe",
                Type.Missing, Type.Missing, Type.Missing, Type.Missing);
            ie.DocumentComplete += new DWebBrowserEvents2_DocumentCompleteEventHandler(ie_DocumentComplete);


        }

        static void ie_DocumentComplete(object pDisp, ref object URL)
        {
            string aa = (((mshtml.HTMLDocumentClass)ie.Document).documentElement).innerHTML;
        }
    }
}
